< previous page page_330 next page >

Page 330
9f31265bb40b592b1929e18a47ab28e5.gif
Sub Proc2()
   Dim strName As String
   strName = "Bill Gates"

   frmDebug1.Print "We Are Now In Proc2()"

   Stop

   frmDebug1.Print strName

   Call Proc3
End Sub
9f31265bb40b592b1929e18a47ab28e5.gif
TIP
Be sure to remove Stop statements from your code before making an EXE file, or you can surround the Stop statements with conditional compilation (
#if/#endif) statements so theyre not included in the compiled program.
Setting Watch Variables
Many times in an application, you can watch the value inside of a variable or property. Visual Basic lets you specify which variables you want to watch. These are placed in a special Watch pane above the Immediate window.
EXERCISE
Adding Watch Variables
1. Stop the application.
2. Go to the Form_Load() procedure in Debug1.frm.
3. Click the gintValue variable and select Debug, Add Watch from the Visual Basic menu. The gintValue variable has already been added to the Expression text box.
4. Choose the (All Modules) option from the Modules: combo box in the Context frame shown in Figure 16.9. This tells Visual Basic to watch the variable named gintValue through all of the modules.

 
< previous page page_330 next page >

If you like this book, buy it!